<template>
  <el-container>
    <el-aside width="200px">
      <el-menu unique-opened text-color="#fff" active-text-color="#ffd04b" :default-active="$route.path" :router="true" background-color="#585E64">
        <el-submenu index="2">
          <template slot="title">数据中心</template>
          <el-menu-item index="/main/resource/dataCenterList">数据中心</el-menu-item>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">设备</template>
          <el-menu-item index="/main/resource/rackList">机柜</el-menu-item>
          <el-menu-item index="/main/resource/enclosureList">机框</el-menu-item>
          <el-menu-item index="3-3">服务器</el-menu-item>
          <el-menu-item index="3-4">网络设备</el-menu-item>
          <el-menu-item index="3-5">存储设备</el-menu-item>
        </el-submenu>
        <el-submenu index="4">
          <template slot="title">联系人</template>
          <el-menu-item index="4-1">内部员工</el-menu-item>
        </el-submenu>
        <el-submenu index="5">
          <template slot="title">IP管理</template>
          <el-menu-item index="5-1">IP管理</el-menu-item>
        </el-submenu>
      </el-menu>
    </el-aside>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>
</template>

<script>
export default {
  name: 'Resource'
};
</script>

<style lang="scss" scoped>
.el-container {
  .el-aside {
    height: calc(100vh - 60px);
    background-color: #585e64;
    overflow-y: hidden;
  }
  .el-menu {
    border: 0;
    .el-submenu {
      &:hover {
        background-color: #585e64;
      }
      .el-menu-item {
        background-color: #585e64;
        &:hover {
          background-color: #3f454b;
        }
      }
    }
  }
  .el-main {
    padding: 16px;
    height: calc(100vh - 60px);
  }
}
</style>
